<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>获取内存中的日志缓存数组</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="seaslog.getbasepath.html">« SeasLog::getBasePath</a></li>
      <li style="float: right;"><a href="seaslog.getbufferenabled.html">SeasLog::getBufferEnabled »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.seaslog.html">SeasLog</a></li>
    <li>获取内存中的日志缓存数组</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="seaslog.getbuffer" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SeasLog::getBuffer</h1>
  <p class="verinfo">(PECL seaslog &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">SeasLog::getBuffer</span> &mdash; <span class="dc-title">获取内存中的日志缓存数组</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-seaslog.getbuffer-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>SeasLog::getBuffer</strong></span>(): <span class="type">array</span></div>

  <p class="para rdfs-comment">

  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-seaslog.getbuffer-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-seaslog.getbuffer-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   以 Array 形式返回内存中的日志缓存。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-seaslog.getbuffer-examples">
  <h3 class="title">范例</h3>
  <div class="example" id="example-3527">
   <p><strong>示例 #1 <span class="function"><strong>SeasLog::getBuffer()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">SeasLog</span><span style="color: #007700">::</span><span style="color: #0000BB">info</span><span style="color: #007700">(</span><span style="color: #DD0000">'info&nbsp;log'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">SeasLog</span><span style="color: #007700">::</span><span style="color: #0000BB">debug</span><span style="color: #007700">(</span><span style="color: #DD0000">'debug&nbsp;log'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">SeasLog</span><span style="color: #007700">::</span><span style="color: #0000BB">getBuffer</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

   <div class="example-contents"><p>以上例程的输出类似于：</p></div>
   <div class="example-contents screen">
<div class="cdata"><pre>
bool(true)
bool(true)
array(1) {
  [&quot;/var/log/www/default/20180707.log&quot;]=&gt;
  array(2) {
    [0]=&gt;
    string(79) &quot;2018-07-07 10:43:32 | INFO | 71785 | 5b4028d4c58d5 | 1530931412.810 | info log
&quot;
    [1]=&gt;
    string(81) &quot;2018-07-07 10:43:32 | DEBUG | 71785 | 5b4028d4c58d5 | 1530931412.810 | debug log
&quot;
  }
}
</pre></div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-seaslog.getbuffer-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><a href="seaslog.configuration.html#ini.seaslog.use-buffer" class="link">seaslog.use_buffer</a></li>
   <li class="member"><a href="seaslog.configuration.html#ini.seaslog.buffer-size" class="link">seaslog.buffer_size</a></li>
   <li class="member"><a href="seaslog.configuration.html#ini.seaslog.buffer-disabled-in-cli" class="link">seaslog.buffer_disabled_in_cli</a></li>
   <li class="member"><span class="methodname"><a href="seaslog.getbufferenabled.html" class="methodname" rel="rdfs-seeAlso">SeasLog::getBufferEnabled()</a> - Determin if buffer enabled</span></li>
   <li class="member"><span class="methodname"><a href="seaslog.flushbuffer.html" class="methodname" rel="rdfs-seeAlso">SeasLog::flushBuffer()</a> - 将日志缓存刷新到介质中，文件介质，或者发送到远端的 TCP/UDP 服务地址。</span></li>
  </ul>
 </div>



</div></div></div></body></html>